import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Hottop from '../views/Hottop.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Product from '../views/Product.vue'
import Product_details from '../views/Product_details.vue'
import Cart from '../views/Cart.vue'
import Order from '../views/Order.vue'
import AddressEdit from '../views/AddressEdit.vue'
import Me from '../views/Me.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/product',
    name: 'Product',
    component: Product
  },
  {
    path: '/product_details',
    name: 'Product_details',
    component: Product_details
  },
  {
    path: '/hottop',
    name: 'Hottop',
    component: Hottop
  },
  {
    path: '/cart',
    name: 'Cart',
    component: Cart
  },
  {
    path: '/order',
    name: 'Order',
    component: Order
  },
  {
    path: '/addressedit',
    name: 'AddressEdit',
    component: AddressEdit
  },
  {
    path: '/me',
    name: 'Me',
    component: Me
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})


export default router
